import { makeAutoObservable } from 'mobx';
import { getHouselist, isflag } from '@/services';
import { HouseBody } from '../../utils/houselist'
class Houselist {
    constructor() {
        makeAutoObservable(this);
    }
    houselist: HouseBody[] = [];
    //获取房屋列表
    async getHouselist(params: any) {
        let result: any = await getHouselist(params);
        if (result) {
            result.body.forEach((item: any) => {
                item.disabled = false;
            });
            console.log(result.body)
            this.houselist = result.body;
        }
    };
    //房屋上架下架
    async isDisabled(params: any) {
        let result = await isflag(params);
        if (result) {
            return result;
        }
    }
}
export default new Houselist